package com.gln.bloger.service;

import java.util.List;

import com.gln.bloger.exception.BlogerException;
import com.gln.bloger.pojos.Category;
import com.gln.bloger.pojos.Website;
import com.gln.bloger.util.PagingSupport;

public interface  CategoryService {
	/**
	 * get  categories for guest
	 * @return
	 * @throws BlogerException
	 */
	public PagingSupport<Category> getCategories(Website website) throws BlogerException;
	/**
	 * get category list for guest
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public List<Category> getCategoryList(Website website) throws BlogerException;
	/**
	 * get all categories for author
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public PagingSupport<Category> getAllCategories(Website website) throws BlogerException;
	/**
	 * get category by id
	 * @param id
	 * @throws BlogerException
	 */
	public Category getCategory(String cateId) throws BlogerException;
	/**
	 * get category by name
	 * @param website
	 * @param cateName
	 * @return
	 * @throws BlogerException
	 */
	public Category getCategoryByName(Website website, String cateName) throws BlogerException;
	/**
	 * remove category
	 * @param categoryId
	 * @throws BlogerException
	 */
	public void removeCategory(String cateId) throws BlogerException;

	/**
	 * save category
	 */
	public void saveOrUpdateCategory(Category category)throws BlogerException;
	/**
	 * clear cached categories
	 * @throws BlogerException
	 */
	public void clearCachedCategories();
}
